package com.tedu.egspringbootmvc.pojo.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserDTO {
    @NotNull
    @Pattern(regexp = "[\\u4e00-\\u9fa5A-Za-z0-9_]{2,10}",message = "用户名格式应为2-10位的英文汉字数字_")
    private String username;
    @NotNull
    @Pattern(regexp = "[A-Za-z0-9]{3,10}",message = "密码应为3-10位的英文数字和_")
    private String password;
}
